package com.zhxh.nzpos;

import szxb.test.ll.jni.test4052;
import android.app.Application;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.StrictMode;

import com.zhxh.nzpos.utils.DBUtil;

public class NZPosApplication extends Application {
    private static final boolean DEVELOPER_MODE = false;

    public void onCreate() {
        /* Enable Strict Mode if DEVELOPER_MODE is set */
        if (DEVELOPER_MODE) {
            StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                    .detectAll()
                    .permitDiskReads()
                    .penaltyLog()
                    .build());
            StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
                    .detectAll()
                    .penaltyLog()
                    .penaltyDeath()
                    .build());
        }
        DBUtil.initDataBase(getApplicationContext());
        
      //  test4052.testopen();
     //   test4052.testioctl(1);
//        SharedPreferences sp = getSharedPreferences("android_serialport_api.sample_preferences", MODE_PRIVATE);
//        Editor editor = sp.edit();
//        editor.putString("DEVICE", "/dev/ttySAC0");
//        editor.putInt("BAUDRATE", 9600);
//        editor.commit();
        super.onCreate();
    }

}